package com.limao.Admin.Servlet;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.limao.Model.LzPluginException;
import com.limao.Tool.CacheClass;


public class adminLoinInfo {

	public static void reg_web(HttpSession session,HttpServletRequest request,HttpServletResponse response) throws LzPluginException, ServletException, IOException
	{
		String introduceId = request.getParameter("introduceId");
		String platform = request.getParameter("platform");
		String company = request.getParameter("c");
		if(CacheClass.isEmpty(introduceId))
			introduceId="";
		if(CacheClass.isEmpty(company))
			company="";
		
		request.setAttribute("introduceId", introduceId); 
		request.setAttribute("company", company); 
		RequestDispatcher rd;
		if(CacheClass.isEmpty(platform))
			rd = request.getRequestDispatcher("mb/jsp/register.jsp");
		else 
			rd = request.getRequestDispatcher("reg.jsp");
		rd.forward(request, response);
	}
	
	public static void myqrcode(HttpSession session,HttpServletRequest request,HttpServletResponse response) throws LzPluginException, ServletException, IOException
	{
		request.setAttribute("url", CacheClass.getMyUrl(session.getId())); 
		RequestDispatcher rd = request.getRequestDispatcher("myqrCode.jsp");
		rd.forward(request, response);
	}	
	
	
	
}
